package main

import (
	"fmt"
	"time"
)

func a(ch chan string){
	time.Sleep(1*time.Second)
	ch <- "text2"
	fmt.Println(22222)

}


func b(ch chan string){

	//ch <- "text"
	fmt.Println(11111)
	close(ch)
}


func main(){
	ch := make(chan string ,2)
	ch <- "text1"
	go a(ch)
	go b(ch)
	time.Sleep(2*time.Second)
}